From 35dbf099ac18924d40533c9d1b9bfbf1ecb818c9 Mon Sep 17 00:00:00 2001 From: Bob Liu Date: Thu, 4 Aug 2016 09:07:56 +0800 Subject: [PATCH] libxl: return any serial tty path in libxl_console_get_tty When specifying a serial list in domain config, users of libxl_console_get_tty cannot get the tty path of a second specified pty serial, since right now it always returns the tty path of serial 0. Signed-off-by: Bob Liu Acked-by: Wei Liu --- tools/libxl/libxl.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/tools/libxl/libxl.c b/tools/libxl/libxl.c index 7bd3e8ccac..1de293b5d0 100644 --- a/tools/libxl/libxl.c +++ b/tools/libxl/libxl.c @@ -1786,7 +1786,7 @@ int libxl_console_get_tty(libxl_ctx *ctx, uint32_t domid, int cons_num, switch (type) { case LIBXL_CONSOLE_TYPE_SERIAL: - tty_path = GCSPRINTF("%s/serial/0/tty", dom_path); + tty_path = GCSPRINTF("%s/serial/%d/tty", dom_path, cons_num); break; case LIBXL_CONSOLE_TYPE_PV: if (cons_num == 0) -- 2.30.2